<template>
    <file-handler
        :uid="0"
        :modifiable="isModifiable"
        :path="path"
    >

    </file-handler>
</template>

<script>
import FileHandler from '../../components/FileHandler.vue'
export default {
  components: { FileHandler },
  data() {
    return {
        path: ''
    }
  },
    methods: {
      updatePath() {
        this.path = this.$route.params.pathMatch || '/'
      }
    },
  computed: {
    userInfo() {
      return this.$store.getters.userInfo
    },
    isModifiable() {
      return this.userInfo != null && this.userInfo.type == 1
    },
    userInfo() {
        return this.$store.getters.userInfo
    }
  },
  mounted() {
    this.updatePath()
  },
  watch: {
    $route(to, from) {
      this.updatePath()
    }
  }
}
</script>

<style>

</style>